package com.loongtech.bi.entity.core;

import java.util.Comparator;

public class ServerComparator implements Comparator<EntityChannelServer>
{
	@Override
	public int compare(EntityChannelServer o1, EntityChannelServer o2)
	{
		if (!o1.getDate().equals(o2.getDate()))
		{
			return o1.getDate().compareTo(o2.getDate());
		}
		if (!o1.getServerId().equals(o2.getServerId()))
		{
			return o1.getServerId().compareTo(o2.getServerId());
		}
		if (!o1.getChannelId().equals(o2.getChannelId()))
		{
			return o1.getChannelId().compareTo(o2.getChannelId());
		}
		return 0;
	}
}
